﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace BoriPeter.FatSecret.Models
{
    [XmlRoot("month", Namespace = "http://platform.fatsecret.com/api/1.0/")]
    public class FoodEntriesGetMonthModel
    {
        /// <summary>
        /// is an Int – the first day in the nominated month, see dateint.
        /// </summary>
        [XmlElement("from_date_int")]
        public int FromDateInt { get; set; }

        /// <summary>
        /// is an Int – the last day in the nominated month, see dateint.
        /// </summary>
        [XmlElement("to_date_int")]
        public int ToDateInt { get; set; }

        /// <summary>
        /// Each day element contains summary nutritional information for a single day.
        /// </summary>
        [XmlElement("day")]
        public FoodEntriesGetMonthDay[] Days { get; set; }
    }

    public class FoodEntriesGetMonthDay
    {
        /// <summary>
        /// date_int is an Int – the day of the month, see dateint.
        /// </summary>
        [XmlElement("date_int")]
        public int DateInt { get; set; }

        /// <summary>
        /// calories is a Decimal – the total daily energy consumed in kcal
        /// </summary>
        [XmlElement("calories")]
        public decimal Calories { get; set; }

        /// <summary>
        /// carbohydrate is a Decimal – the total daily carbohydrate consumed in grams.
        /// </summary>
        [XmlElement("carbohydrate")]
        public decimal Carbohydrate { get; set; }

        /// <summary>
        /// protein is a Decimal – the total daily protein consumed in grams.
        /// </summary>
        [XmlElement("protein")]
        public decimal Protein { get; set; }

        /// <summary>
        /// fat is a Decimal – the total daily total fat consumed in grams.
        /// </summary>
        [XmlElement("fat")]
        public decimal Fat { get; set; }
    }
}
